# ifndef DEF_HERO
# define DEF_HERO

# include "Source.h"

# include "Personage.h"

class Hero : public Personage
{
	public:

	Hero();
	~Hero();

	void setLifeBar( CEGUI::ProgressBar*);
	void setManaBar( CEGUI::ProgressBar*);
	void setAction( Action);
	void setTarget( Enemy*);
	void setTalk( PNJ*);
	void setActionTarget( ObjectAction*);

	int getStrength();
	int getAgility();
	int getStamina();
	int getPower();
	int getCurrentMana();
	int getMana();
	unsigned int getLevel();
	unsigned int getExperience();
	unsigned int getNextExperience();
	unsigned int getPointsCharac();
	unsigned int getPointsPower();
	Ogre::Camera* getCamera();
	Ogre::SceneNode* getBodyNode();

	Inventory* getInventory();
	Equipment* getEquipment();
	Quests* getQuests();
	PNJ* getTalk();

	void receiveDamage( const Damage&);
	void receiveExperience( const Experience&);

	bool isDead();

	void init( Game*, Renderer*, AI*, World*, Map*);
	void createNewHero();
	void updateWorld();

	void oneFrame( Ogre::Real);

	void zoom();
	void deZoom();
	void stopZoom();

	void rotateClock();
	void rotateCounterClock();
	void rotateStop();

	void equipWeapon( const std::string&);
	void equipShield( const std::string&);
	void equipArmor( const std::string&);
	void equipJewel( const std::string&);

	void addExperience( unsigned int);

	private:

	Game* myGame;
	AI* myAI;
	World* myWorld;
	Map* myMap;

	bool myLoaded;

	Ogre::Camera* myCamera;
	Ogre::Viewport* myViewport;

	Ogre::SceneNode* myCameraNode;
	Ogre::Real myAngleCamera;
	Ogre::Real myDistanceCamera;
	Ogre::Real mySpeedCamera;
	Ogre::Real myRotationCamera;

	CEGUI::ProgressBar* myLifeBar;
	CEGUI::ProgressBar* myManaBar;

	Action myAction;

	Enemy* myTarget;
	PNJ* myTalk;
	ObjectAction* myActionTarget;

	std::vector< std::string*> myPNJTalked;

	int myStrength;
	int myAgility;
	int myStamina;
	int myPower;
	int myMana;
	int myManaCurrent;

	unsigned int myExperience;
	unsigned int myNextExperience;
	unsigned int myPointsCharac;
	unsigned int myPointsPower;

	Inventory* myInventory;
	Equipment* myEquipment;
	Quests* myQuests;
};

# endif